package com.j1ay.forum.model.pojo.vo;

/**
 * @Author J1ay
 * @Date 2021/12/16 14:50
 * @Description 错误码枚举
 */

public enum ErrorCode {
    PARAMS_ERROR(400,"参数不合法~"),
    PARAMS_BLANK(400,"参数不能为空~"),
    ACCOUNT_USER_NOT_EXIST(401,"该账号不存在~"),
    ACCOUNT_USER_IS_EXIST(4000,"该手机号已经被注册过啦~"),
    ACCOUNT_NICK_IS_EXIST(4001,"已存在该昵称啦~"),
    ACCOUNT_ALL_IS_EXIST(4002,"手机号和昵称都被注册过了呢~"),
    ACCOUNT_PWD_NOT_TRUE(401,"账号和密码不一致~"),
    NO_PERMISSION(403,"暂无该权限~"),
    NO_TOKEN(403,"没有凭证哦~"),
    SESSION_FAILED(405,"出错啦，请稍微再试~"),
    SESSION_TIME_OUT(405,"连接超时~"),
    NO_LOGIN(406,"您还未登录或登录超时，请重新登录~"),
    TOKEN_FAILED(406,"登录超时，请重新登录哦~");

    private int code;
    private String msg;

    ErrorCode(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
